<template>
  <div>
    <!-- 基础信息  -->
    <basic-info :product-id="productId" @init="setCraftId" />
    <!-- 设计图稿 -->
    <design-draft :product-id="productId" :biz-scene="bizScene" />
    <!-- 尺寸表 /craft/baseSize/{craftId}工艺单尺寸信息 -->
    <size-chart
      v-if="craftId !== -1"
      :craft-id="craftId"
      :product-id="productId"
      :biz-scene="bizScene"
    />
    <!-- 工艺说明 -->
    <craft-des :product-id="productId" :biz-scene="bizScene" />
    <!-- 批样评语  /craft/remark/{craftId}-->
    <comment :product-id="productId" :biz-scene="bizScene" />
    <!-- 面辅料裁剪要求 写死 -->
    <crop-request />
    <!-- 附件 -->
    <annex :product-id="productId" />
  </div>
</template>

<script>
import BasicInfo from './BasicInfo'
import DesignDraft from './DesignDraft'
import SizeChart from './SizeChart'
import CraftDes from './CraftDes'
import Comment from './Comment'
import CropRequest from './CropRequest'
import Annex from './Annex'

export default {
  components: {
    BasicInfo,
    DesignDraft,
    SizeChart,
    CraftDes,
    Comment,
    CropRequest,
    Annex
  },
  props: {
    bizScene: {
      type: Number,
      default: -1
    }
  },
  data() {
    return {
      productId: Number(this.$route.query.productId),
      craftId: -1
    }
  },
  methods: {
    setCraftId(id) {
      this.craftId = id
    }
  }
}
</script>
